<form nz-form nzLayout="inline">
  <nz-form-item>
    <nz-form-label>Auto Mod </nz-form-label>
    <nz-form-control>
      <nz-input-group nzCompact>
        <nz-switch
          [name]="autoMod.id"
          [(ngModel)]="autoMod.on"
          nzSize="small"
        ></nz-switch>
        <nz-select
          nzSize="small"
          class="autoTime"
          [(ngModel)]="autoMod.interval"
          [name]="autoMod.id + 'C'"
        >
          <nz-option
            *ngFor="let interval of INTERVALS; trackBy: getIntervalId"
            [nzLabel]="interval.label"
            [nzValue]="interval.value"
          ></nz-option>
        </nz-select>
      </nz-input-group>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label
      nz-popover
      nzPopoverTitle="Min. components %"
      nzPopoverContent="Minimum percentage of components required for auto modding."
    >
      Min. components %
    </nz-form-label>
    <nz-form-control>
      <nz-input-number
        nzSize="small"
        [name]="autoMod.id + 'cp'"
        nzMin="0"
        nzMax="100"
        [(ngModel)]="autoMod.minCompPercent"
      ></nz-input-number>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label
      nz-popover
      nzPopoverTitle="Priority"
      nzPopoverContent="In case more auto buyer are available on the same update cycle, high priority execute first."
      >Priority</nz-form-label
    >
    <nz-form-control>
      <nz-input-number
        nzSize="small"
        [name]="autoMod.id + 'P1'"
        [(ngModel)]="autoMod.priority"
      ></nz-input-number>
    </nz-form-control>
  </nz-form-item>
</form>
